package com.sna.snaapplication.entity.File;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

//文件实体类
@Data
@TableName("files")
public class FileEntity {


    @TableId(type = IdType.AUTO)
    private Long id;

    private Long userId;


    private String name;



    private Long size;


    @TableField("file_type")
    private String fileType;


    private byte[] content;


    @TableField("storage_path")
    private String storagePath;



    @TableField(value = "created_at", insertStrategy = FieldStrategy.NEVER)
    private LocalDateTime createdAt;



    @TableField(value = "updated_at", updateStrategy = FieldStrategy.NEVER)
    private LocalDateTime updatedAt;


    @TableField("last_opened_at")
    private LocalDateTime lastOpenedAt;
}